package com.example.custom.boot.starter.config;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author duanqichao
 * date: 2021/01/15 1:27
 */

@ConfigurationProperties(prefix = "fruit")
@Component
public class FruitConfig {
    private String name;
    private String price;
    private String unit;
    private String packageDate;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getPackageDate() {
        return packageDate;
    }

    public void setPackageDate(String packageDate) {
        this.packageDate = packageDate;
    }

    @Override
    public String toString() {
        return "FruitService{" +
                "name='" + name + '\'' +
                ", price='" + price + '\'' +
                ", unit='" + unit + '\'' +
                ", packageDate='" + packageDate + '\'' +
                '}';
    }
}
